home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7308 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  970 b 

  1. Path: druid.borland.com!usenet
  2. From: pete@borland.com (Pete Becker)
  3. Newsgroups: comp.lang.ada,comp.lang.c++
  4. Subject: Re: on OO differnces between Ada95 and C++
  5. Date: 22 Feb 1996 16:01:39 GMT
  6. Organization: Borland International
  7. Message-ID: <4gi413$qo1@druid.borland.com>
  8. References: <4gbq7q$g08@qualcomm.com> <3129F185.41C6@Rational.COM>
  9. NNTP-Posting-Host: pbecker.borland.com
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=ISO-8859-1
  12. X-Newsreader: WinVN 0.99.5
  13.  
  14. In article <3129F185.41C6@Rational.COM>, jDesquilbet@Rational.COM says...
  15. >
  16. >- you may have several different definitions for the same class in the
  17. >same program, as long as they are never compiled together in the same
  18. >compilation unit; example:
  19. >
  20. >#define private public // *** BERK! ***
  21. >#include "...h"        // second definition for the same class
  22. >#undef private
  23.  
  24. This is not true. A program that attempts to do this violates the one 
  25. definition rule, so it is not a legal C++ program.
  26.     -- Pete
  27.  
  28.